package java51_19;

import java.util.*;

public class CalTest {

	public static void main(String[] args) {
		// Calendar
		Calendar c = Calendar.getInstance();
		System.out.println(c.getClass().getName());
		Date d = c.getTime();
		System.out.println(d);
		// get获得时间的各个部分
		int y = c.get(Calendar.YEAR);
		int m = c.get(Calendar.MONTH);
		System.out.println(y + "年" + (m + 1) + "月");
		int days = c.get(Calendar.DAY_OF_YEAR);
		int ws = c.get(Calendar.WEEK_OF_YEAR);
		System.out.println(days + ":" + ws);
		System.out.println(">>>>>>>>>>>>>>>>>..");
		// >>>c.set(Calendar.DAY_OF_MONTH, 1);
		c.set(Calendar.DAY_OF_YEAR, 200);
		System.out.println(c.getTime());
	}

}
